interface Girl {
    name: string;
    age: number;
    bust: number;
    waistline?: number; // 这个是可选属性
    [propname: string]: any; // 允许其他任何属性名和属性值
    say(): string; // 必须有 say 函数且必须返回字符串
}

// 接口的继承
interface Teacher extends Girl {
    teach(): string
}

// 类
class XiaoJieJie implements Teacher {
    name = '大脚'
    age = 18
    bust = 90
    say() {
        return 'Welcome '
    }
    teach() {
        console.log('让我教你')
        return '让我教你'
    }
}

const girl: Girl = {
    name: '小红',
    age: 18,
    bust: 94,
    // waistline: 21,
    sex: '女',
    say() {
        return 'Welcome to TypeScript'
    }
}
const dajiao = new XiaoJieJie()

console.log(girl, dajiao)
dajiao.teach()
